jQuery(function($) {
	$(".block-tab-btn").hover(
        function () {
            var show_content_str = "#" + $(this).attr("id") + "-content";
            $("#block-tab-title").html($(show_content_str + " > h2").html());    
            $("#block-tab-content").html($(show_content_str + " > div").html());
            //offset of bg was store in h2's class attr 
            var offset = $(show_content_str + " > h2").attr("class");
            $("#block-tab-title-wrapper").css("background-position", "0px -" + offset +"px");
            
        },
        function () {
        }
    ); 
    //default page: tag cloud
    $("#block-tab-title").html($("#block-cloud-tab-btn-content" + " > h2").html());    
    $("#block-tab-content").html($("#block-cloud-tab-btn-content" + " > div").html()); 
    $("#block-tab-title-wrapper").css("background-position", "0px -42px");
}); 

